from gnn_transformer.own_dataset import MyDataset
from gnn_transformer.utils import DataProcesser
import os
os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE"

dataset=MyDataset()
# for data in dataset:
#     DataProcesser.graph_showing(data)
DataProcesser.graph_showing(dataset[0])

# import networkx as nx
# import matplotlib.pyplot as plt
#
#
# def main1():
#     G = nx.Graph()
#
#     # topology construction logic
#     G.add_node('s1', desc='I am switch 1')
#     G.add_node('s2', desc='I am switch 2')
#     G.add_node('s3', desc='I am switch 3')
#     G.add_edge('s1', 's2', name='edge 0')
#     G.add_edge('s1', 's3', name='edge 1')
#     G.add_edge('s2', 's3', name='edge 2')
#
#     # draw graph with labels
#     pos = nx.spring_layout(G)
#     nx.draw(G, pos)
#     node_labels = nx.get_node_attributes(G, 'desc')
#     nx.draw_networkx_labels(G, pos, labels=node_labels)
#     edge_labels = nx.get_edge_attributes(G, 'name')
#     nx.draw_networkx_edge_labels(G, pos, edge_labels=edge_labels)
#     plt.show()
#
#
# if __name__ == '__main__':
#     main1()
